package crawler.server.manage.controller;

import java.io.IOException;
import java.util.List;

import org.apache.http.client.ClientProtocolException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import crawler.server.manage.configure.LocalConfigure;
import crawler.utility.http.HttpClientUtil;


@RestController
public class ManageController {
	
	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Autowired
	private LocalConfigure localConfigure;
	
	@GetMapping("/manage")
	public String manage() throws ClientProtocolException, IOException {
		logger.info("LocalConfigure Port : " + localConfigure.getPort());
		
		HttpClientUtil httpClientUtil = new HttpClientUtil();
		httpClientUtil.setUrl("https://www.baidu.com/");
		httpClientUtil.get();
		
		return "ManageController";
	}
	
}
